from django.db import models


# Create your models here.
class DemoBook(models.Model):
    title = models.CharField(max_length=200, verbose_name="书籍名称")
    price = models.CharField(max_length=200, verbose_name="书籍价格")
    create_time = models.DateTimeField(auto_now_add=True, verbose_name="创建时间")
    update_time = models.DateTimeField(auto_now=True, verbose_name="更新时间")

    class Meta:
        db_table = "tb_demo_book"
        verbose_name = "练习book"
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.title
